home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Franz PD / Franz PD Disk #279 (1993)(Rhein-Sieg-Soft).zip / Franz PD Disk #279 (1993)(Rhein-Sieg-Soft).adf / ak_gen0-lib_V38.20.LHA / ak_gen0-library / Programmers.LHA / Programmers / Examples / OpenLib.c < prev    next >
C/C++ Source or Header  |  1993-06-26  |  1KB  |  46 lines

  1.  
  2.  /* OpenLib V 37.83                                            */
  3.  /* FREEWARE.                                                  */
  4.  /* (c) 1992-93 by Andreas R. Kleinert.                        */
  5.  /* Demonstrates opening and closing of "ak_gen0.library" V37+ */
  6.  /* Written in SAS/C V6.00 for OS V2.04 (V37) Includes.        */
  7.  
  8. #include <ak_gen0/ak_gen0_pragma.h>
  9.  
  10. #include <exec/libraries.h>
  11.  
  12. #include <stdlib.h>
  13.  
  14. #include <proto/exec.h>
  15.  
  16. void main(long argc, char **argv) /* MAIN */
  17. {
  18.  struct Library *AKLib = N;
  19.  
  20.  printf("\nOpenLib V37.83, FREEWARE, (c) 1992-93 by Andreas R. Kleinert.\n");
  21.  
  22.  AKBase = (struct AKBase *) OpenLibrary("ak_gen0.library", 37);
  23.  if(!AKBase)
  24.   {
  25.    printf("\n Can't open \42ak_gen0.library\42 V37+ !\n");
  26.   }else
  27.   {
  28.    AKLib = (struct Library *) AKBase;
  29.  
  30.    printf("\nName      : %s", AKLib->lib_Node.ln_Name);
  31.    printf("\nFlags     : %d", AKLib->lib_Flags);
  32.    printf("\nPosSize   : %d", AKLib->lib_PosSize);
  33.    printf("\nNegSize   : %d", AKLib->lib_NegSize);
  34.    printf("\nVersion   : %d", AKLib->lib_Version);
  35.    printf("\nRevision  : %d", AKLib->lib_Revision);
  36.    printf("\nID-String : %s", AKLib->lib_IdString);
  37.    printf("\nSum       : %d", AKLib->lib_Sum);
  38.    printf("\nOpenCnt   : %d", AKLib->lib_OpenCnt);
  39.  
  40.    printf("\n\n");
  41.    CloseLibrary((struct Library *) AKBase);
  42.   }
  43.  
  44.  exit(0);
  45. }
  46.